# -*- coding: utf-8; mode: snippet -*-
# name: Kaplan-Meier from lifelines
# key: kaplanmeier@lifeline
# key: km_lifeline
# contributor: Shuguang Sun
# --
# from lifelines import KaplanMeierFitter
from lifelines.statistics import logrank_test

${1:kmf} = KaplanMeierFitter()
$1.fit(durations=${2:dtin}["${3:time}"], event_observed=$2["${4:event}"], label="$0")
$1.survival_function_